<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>审查专家监管</title>
    <script src="../../js/header.js"></script>
    <style type="text/css">
        html, body, #expertextract {
            padding: 0px;
            margin: 0px;
            /*height: 100%;*/
        }
        #expertextract{
            border-top: 3px solid #0D9AFF;
            /*background: #FFFFFF;
            box-shadow: 0px 2px 4px 0 rgba(200,200,200,0.50);*/
            padding: 25px;
            /*background: url(../../images/bg.png) no-repeat;
            background-size: 100% 100%;
            overflow: hidden;*/
        }
        .tab-title{
            font-size: 16px;
            font-weight: bold;
            border-left: 4px solid #0D9AFF;
            font-family: PingFangSC-Medium;
            padding-left:10px;
            margin-bottom: 20px;
        }
        .el-dialog__footer {
            padding: 10px 20px 20px;
            text-align: center;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
        }
        .el-dialog__body {
            color: rgb(96, 98, 102);
            font-size: 14px;
            word-break: break-all;
            padding: 0px 20px;
        }
        #excel {
            display: none;
        }
        .el-input__inner {
            -webkit-appearance: none;
            background-color: #FFF;
            background-image: none;
            border-radius: 4px;
            border: 1px solid #DCDFE6;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            color: #606266;
            display: inline-block;
            font-size: inherit;
            height: 30px;
            line-height: 30px;
            outline: 0;
            padding: 0 15px;
            -webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
            transition: border-color .2s cubic-bezier(.645,.045,.355,1);
        }
        .listed .el-form-item__label{
            letter-spacing: 3px;
        }
        .el-textarea {
            width: 95%;
        }
        #expertextract .el-input{
        	width: 80%;
        }

        /* 搜索按钮样式修改 */
        #expertextract .el-button.is-circle.search_btn{
            position: absolute;
            right: 0;
            top: 0;
            border: 0;
            background: none;
        }
        #expertextract .el-button.is-circle.search_btn i{
            font-size: 17px;
        }
    </style>
</head>
<body>
    <div v-cloak id="expertextract">
        <div style="margin-top: 10px;">
            <div style="margin-top: 10px;border-bottom:1px solid rgba(200,200,200,0.43);">
                <el-form :model="selectForm" :rules="rules" ref="selectForm" label-width="150px">
                    <el-row>
                        <el-col :span="10">
                            <el-form-item label="标题:" prop="" label-width="80px">
                                <el-input v-model="selectForm.title" placeholder="" ></el-input>
                            </el-form-item>
                        </el-col>

                        <div style="float: right;">
                            <el-button type="primary" size="small" style="width: 60px;height: 30px;" @click="apply()">申请</el-button>
                            <el-button type="primary" size="small" style="width: 60px;height: 30px;" @click="searchForm('selectForm')">查询</el-button>
                            <el-button type="warning" size="small" style="width: 60px;height: 30px;" @click="resetForm('selectForm')">重置</el-button>
                        </div>
                    </el-row>
                </el-form>
            </div>

            <el-table :data="tableData" border style="width: 100%;margin-top: 35px;" :header-cell-style="{background:'#eef1f6',color:'#606266'}">
                <!--<el-table-column type="selection" ></el-table-column>-->
                <el-table-column
                        prop="title"
                        label="标题"
                        width="200"
                        align="center" >
                </el-table-column>
                <el-table-column
                        prop="countryRatio"
                        label="国家级抽取比例"
                        width="150"
                        align="center">
                </el-table-column>
                <el-table-column
                        prop="provinceRatio"
                        label="省级抽取比例"
                        width="150"
                        align="center">
                </el-table-column>
                <el-table-column
                        prop="cityRatio"
                        label="地市级抽取比例"
                        width="150"
                        align="center">
                </el-table-column>
                <el-table-column
                        prop="regulatoryNum"
                        label="抽取人数"
                        width="150"
                        align="center">
                </el-table-column>
                <el-table-column
                        prop="createTime"
                        label="创建时间"
                        width="150"
                        align="center">
                </el-table-column>
                <el-table-column
                        label="操作"
                        width=""
                        align="center">
                    <template slot-scope="scope">
                        <el-button size="mini" @click="expertList(scope.$index,scope.row)">查看专家列表</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <div style="overflow: hidden;">
                <div class="pagination">
                    <el-pagination
                            @size-change="handleSizeChange"
                            @current-change="handleCurrentChange"
                            :current-page="currentPage"
                            :page-sizes="[10, 20, 30, 40]"
                            :page-size="pagesize"
                            background
                            layout="total, sizes,prev, pager, next"
                            :total="tableTotal"
                            prev-text="上一页"
                            next-text="下一页">
                    </el-pagination>
                </div>
            </div>

            <!-- 专家抽取列表 -->
            <el-dialog title="" :visible.sync="dialogExpertForm" center fullscreen>
                <div style="margin-top: 10px;">
                    <el-form :model="expertextract" :rules="rules" ref="expertextract" label-width="140px">
                        <!--审查专家监管信息表-->
                        <el-row>
                            <el-col :span="4" class="tab-title">
                        		审查专家监管信息表
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="20">
                                <el-form-item label="标题:" prop="title">
                                    <el-input v-model="expertextract.title" placeholder="" :disabled="expertFormDisabled"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row :gutter="20">
                            <el-col span="5">
                                <el-form-item label="国家级抽取比例:" prop="countryRatio">
                                    <el-input v-model="expertextract.countryRatio" placeholder="" :disabled="expertFormDisabled"></el-input>%
                                </el-form-item>
                            </el-col>
                            <el-col :span="5">
                                <el-form-item label="省级抽取比例:" prop="provinceRatio">
                                    <el-input v-model="expertextract.provinceRatio" placeholder="" :disabled="expertFormDisabled"></el-input>%
                                </el-form-item>
                            </el-col>
                            <el-col span="5">
                                <el-form-item label="地、市级抽取比例:" prop="cityRatio">
                                    <el-input v-model="expertextract.cityRatio" placeholder="" :disabled="expertFormDisabled"></el-input>%
                                </el-form-item>
                            </el-col>
                            <el-col :span="5">
                                <el-form-item label="抽取总数:" prop="regulatoryNum">
                                    <el-input v-model="expertextract.regulatoryNum" placeholder="" :disabled="expertFormDisabled"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="22">
                                <div style="float:right;">
                                    <el-button v-show="showExpertExtract" type="primary" size="small" style="width: 60px;height: 30px;" @click="expertExtract()">抽取</el-button>
                                    <!--<el-button type="info" size="small" style="width: 60px;height: 30px;" @click="clearExpertExtract()">重置</el-button>-->
                                </div>
                            </el-col>
                        </el-row>
                    </el-form>
                    
                    <el-table :data="expertData" border style="width: 100%;margin-top: 35px;" :header-cell-style="{background:'#eef1f6',color:'#606266'}">
                        <el-table-column type="selection" ></el-table-column>
                        <el-table-column
                                prop="expertName"
                                label="专家姓名"
                                width="200"
                                align="center" >
                        </el-table-column>
                        <el-table-column
                                prop="expertSex"
                                label="性别"
                                width="100"
                                align="center">
                            <template scope="scope">
                                <span v-if="scope.row.expertSex==1">男</span>
                                <span v-if="scope.row.expertSex==2">女</span>
                            </template>
                        </el-table-column>
                        <el-table-column
                                prop="expertSeniority"
                                label="专业资质"
                                width="300"
                                align="center">
                        </el-table-column>
                        <el-table-column
                                prop="expertLevl"
                                label="专家等级"
                                width="120"
                                align="center">
                            <template scope="scope">
                                <span v-if="scope.row.expertLevl==0">地方</span>
                                <span v-if="scope.row.expertLevl==1">省级</span>
                                <span v-if="scope.row.expertLevl==2">国家</span>
                            </template>
                        </el-table-column>
                        <el-table-column
                                prop="workTime"
                                label="工作时间"
                                width="120"
                                align="center">
                        </el-table-column>
                        <el-table-column
                                label="操作"
                                width=""
                                align="center">
                            <template slot-scope="scope">
                                <el-button size="mini" @click="expertView(scope.$index,scope.row)">查看专家详情</el-button>
                                <el-button v-show="( scope.row.cqStatus == 0 ) ? true : false" type="danger" size="mini" @click="expertLawPerson(scope.$index,scope.row);">抽取执法人员</el-button>
                                <el-button v-show="( scope.row.cqStatus != 0 ) ? true : false" size="mini" @click="lawPersonList(scope.$index,scope.row);">查看执法人员</el-button>
                            </template>
                        </el-table-column>
                    </el-table>
                    <div style="overflow: hidden;">
                        <div class="pagination">
                            <el-pagination
                                    @size-change="handleSizeChange"
                                    @current-change="handleCurrentChange"
                                    :current-page="expertCurrentPage"
                                    :page-sizes="[5, 10]"
                                    :page-size="expertPagesize"
                                    background
                                    layout="total, sizes,prev, pager, next"
                                    :total="expertTableTotal"
                                    prev-text="上一页"
                                    next-text="下一页">
                            </el-pagination>
                        </div>
                    </div>
                </div>
            </el-dialog>
            <!-- 执法人员抽取列表 -->
            <el-dialog title="" :visible.sync="dialogLawPersonForm" center fullscreen>
                <div style="margin-top: 10px;">
                    <el-form :model="lawpersonextract" :rules="rules" ref="lawpersonextract" label-width="140px">
                        <!--抽取执法人员信息表-->
                        <el-row>
                            <el-col :span="4" class="tab-title">
                            	抽取执法人员信息表
                            </el-col>
                        </el-row>
                        <el-row :gutter="20">
                            <el-col span="5">
                                <el-form-item label="国家级抽取比例:" prop="countryRatio">
                                    <el-input v-model="lawpersonextract.countryRatio" placeholder="" :disabled="lawFormDisabled"></el-input>%
                                </el-form-item>
                            </el-col>
                            <el-col :span="5">
                                <el-form-item label="省级抽取比例:" prop="provinceRatio" style="position: relative;">
                                    <el-input v-model="lawpersonextract.provinceRatio" placeholder="" :disabled="lawFormDisabled"></el-input>%
                                </el-form-item>
                            </el-col>
                            <el-col span="5">
                                <el-form-item label="地、市级抽取比例:" prop="cityRatio">
                                    <el-input v-model="lawpersonextract.cityRatio" placeholder="" :disabled="lawFormDisabled"></el-input>%
                                </el-form-item>
                            </el-col>
                            <el-col :span="5">
                                <el-form-item label="抽取总数:" prop="extractNum">
                                    <el-input v-model="lawpersonextract.extractNum" placeholder="" :disabled="lawFormDisabled"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="22">
                                <div style="float:right;">
                                    <el-button v-show="showLawPersonExtract" type="primary" size="small" style="width: 60px;height: 30px;" @click="lawPersonExpert()">抽取</el-button>
                                    <!--<el-button type="info" size="small" style="width: 60px;height: 30px;" @click="clearLawPersonForm();">重置</el-button>-->
                                </div>
                            </el-col>
                        </el-row>
                    </el-form>
					
					<el-table :data="lawPersonData" border style="width: 100%;margin-top: 35px;" :header-cell-style="{background:'#eef1f6',color:'#606266'}">
						<el-table-column type="selection" ></el-table-column>
						<el-table-column
								prop="executorName"
								label="姓名"
								width="150"
								align="center" >
						</el-table-column>
						<el-table-column
								prop="executorSex"
								label="性别"
								width="100"
								align="center">
							<template scope="scope">
								<span v-if="scope.row.executorSex==1">男</span>
								<span v-if="scope.row.executorSex==2">女</span>
							</template>
						</el-table-column>
						<el-table-column
								prop="executorCode"
								label="执法证号"
								width="250"
								align="center">
						</el-table-column>
						<el-table-column
								prop="executorOrganization"
								label="所属机构"
								width="250"
								align="center">
						</el-table-column>
						<el-table-column
								prop="executorDepartment"
								label="所属部门"
								width="140"
								align="center">
						</el-table-column>
						<el-table-column
								prop="executorLevel"
								label="执法人员等级"
								width="120"
								align="center">
								<template scope="scope">
									<span v-if="scope.row.executorLevel==0">地方</span>
									<span v-if="scope.row.executorLevel==1">省级</span>
									<span v-if="scope.row.executorLevel==2">国家</span>
								</template>
						</el-table-column>
						<el-table-column
								label="操作"
								width=""
								align="center">
							<template slot-scope="scope">
								<el-button size="mini" @click="lawPersonView(scope.$index,scope.row)">查看详情</el-button>
							</template>
						</el-table-column>
					</el-table>
                    <div style="overflow: hidden;">
                        <div class="pagination">
                            <el-pagination
                                    @size-change="handleSizeChange"
                                    @current-change="handleCurrentChange"
                                    :current-page="lawPersonCurrentPage"
                                    :page-sizes="[5, 10]"
                                    :page-size="lawPersonPagesize"
                                    background
                                    layout="total, sizes,prev, pager, next"
                                    :total="lawPersonTableTotal"
                                    prev-text="上一页"
                                    next-text="下一页">
                            </el-pagination>
                        </div>
                    </div>
					
					<el-row>
                        <el-col :span="22">
                            <div style="float:right;">
                                <el-button v-show="!showLawPersonExtract" type="primary" size="small" style="width: 60px;height: 30px;" @click="dialogLawPersonForm = false;">关闭</el-button>
                            </div>
                        </el-col>
                    </el-row>
                </div>
            </el-dialog>

            <!-- 专家详细系信息 -->
            <el-dialog title="" :visible.sync="expertInfoDialogForm" center fullscreen>
                <div style="margin-top: 10px;">
                    <el-form :model="expertmessage" :rules="rules" ref="expertmessage" label-width="140px">
                        <!--专家信息表-->
                        <el-row>
                            <el-col :span="4" class="tab-title">
                                专家信息表
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="6">
                                <el-form-item label="专家姓名:" prop="expertName">
                                    <el-input v-model="expertmessage.expertName" placeholder="" :disabled="true"></el-input>
                                </el-form-item>
                            </el-col>
                            <el-col span="6">
                                <el-form-item label="性别:" prop="expertSex">
                                    <el-select v-model="expertmessage.expertSex" placeholder="请选择性别" :disabled="true">
                                        <el-option label="男" value="1"></el-option>
                                        <el-option label="女" value="2"></el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="12">
                                <el-form-item label="身份证号:" prop="expertIdcard" style="position: relative;">
                                    <el-input v-model="expertmessage.expertIdcard" placeholder="" :disabled="true"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col span="12">
                                <el-form-item label="专家资历:" prop="expertSeniority">
                                    <el-input v-model="expertmessage.expertSeniority" placeholder="" :disabled="true"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="6">
                                <el-form-item label="工作时间:" prop="workTime">
                                    <el-date-picker
                                            v-model="expertmessage.workTime"
                                            :disabled="formDisabled"
                                            type="date"
                                            placeholder="选择工作时间">
                                    </el-date-picker>
                                </el-form-item>
                            </el-col>
                            <el-col :span="6">
                                <el-form-item label="专家等级:" prop="expertLevl">
                                    <el-select v-model="expertmessage.expertLevl" placeholder="请选择专家等级" :disabled="true">
                                        <el-option label="地方" value="0"></el-option>
                                        <el-option label="省级" value="1"></el-option>
                                        <el-option label="国家" value="2"></el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="12">
                                <el-form-item label="单位所在地:" prop="unitAddress">
                                    <el-input v-model="expertmessage.unitAddress" placeholder="" :disabled="true"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="22">
                                <div style="float:right;">
                                    <el-button type="info" size="small" style="width: 60px;height: 30px;" @click="expertInfoDialogForm = false;">取消</el-button>
                                </div>
                            </el-col>
                        </el-row>
                    </el-form>
                </div>
            </el-dialog>
            <!-- 执法人员详细信息 -->
            <el-dialog title="" :visible.sync="lawPersonInfoDialogForm" center fullscreen>
                <div style="margin-top: 10px;">
                    <el-form :model="lawperson" :rules="rules" ref="lawperson" label-width="140px">
                        <!--执法人员信息表-->
                        <el-row>
                            <el-col :span="4" class="tab-title">
                                执法人员信息表
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="6">
                                <el-form-item label="姓名:" prop="executorName">
                                    <el-input v-model="lawperson.executorName" placeholder="" :disabled="true"></el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :span="12">
                                <el-form-item label="性别:" prop="executorSex" style="position: relative;">
                                    <el-select v-model="lawperson.executorSex" placeholder="请选择性别" :disabled="true">
                                        <el-option label="男" value="1"></el-option>
                                        <el-option label="女" value="2"></el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col span="6">
                                <el-form-item label="执法证号:" prop="executorCode">
                                    <el-input v-model="lawperson.executorCode" placeholder="" :disabled="true"></el-input>
                                </el-form-item>
                            </el-col>
                            <el-col span="12">
                                <el-form-item label="所属机构:" prop="executorOrganization">
                                    <el-input v-model="lawperson.executorOrganization" placeholder="" :disabled="true"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="6">
                                <el-form-item label="所属部门:" prop="executorDepartment">
                                    <el-input v-model="lawperson.executorDepartment" placeholder="" :disabled="true"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="6">
                                <el-form-item label="联系方式:" prop="executorPhoneNum">
                                    <el-input v-model="lawperson.executorPhoneNum" placeholder="" :disabled="true"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="6">
                                <el-form-item label="邮箱:" prop="executorEmail">
                                    <el-input v-model="lawperson.executorEmail" placeholder="" :disabled="true"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="6">
                                <el-form-item label="行业资质:" prop="executorQualification">
                                    <el-input v-model="lawperson.executorQualification" placeholder="" :disabled="true"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="6">
                                <el-form-item label="证件号码:" prop="executorIdCard">
                                    <el-input v-model="lawperson.executorIdCard" placeholder="" :disabled="true"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="6">
                                <el-form-item label="执法人员等级:" prop="executorLevel">
                                    <el-select v-model="lawperson.executorLevel" placeholder="请选择执法人员等级" :disabled="true">
                                        <el-option label="地方" value="0"></el-option>
                                        <el-option label="省级" value="1"></el-option>
                                        <el-option label="国家" value="2"></el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="22">
                                <div style="float:right;">
                                    <el-button type="info" size="small" style="width: 60px;height: 30px;" @click="lawPersonInfoDialogForm = false;">取消</el-button>
                                </div>
                            </el-col>
                        </el-row>
                    </el-form>
                </div>
            </el-dialog>
        </div>
    </div>
</body>
<script>
    var vm  = new Vue({
        el: '#expertextract',
        data() {
            return{
                // 列表页分页
                currentPage: 1, //默认显示页面为1
                pagesize: 10, // 每页的数据条数
                tableTotal:'',
                // 专家分页
                expertCurrentPage: 1,
                expertPagesize: 5,
                expertTableTotal: '',
                // 执法人员分页
                lawPersonCurrentPage: 1,
                lawPersonPagesize: 5,
                lawPersonTableTotal: '',

                selectForm: {
                    title: '',
                },
                expertextract: {
                    id: '',
                    title: '',
                    countryRatio: '',
                    provinceRatio: '',
                    cityRatio: '',
                    regulatoryNum: ''
                },
                lawpersonextract: {
                    id: '',
                    taskId: '', //任务id
                    linkId: '', //专家id
                	countryRatio: '',
					provinceRatio: '',
					cityRatio: '',
					extractNum: ''
                },
                // 执法人员详细信息
                lawperson: {
                    id: '',// 表单id
                    executorName: '',
                    executorSex: '',
                    executorCode: '',
                    executorOrganization: '',
                    executorDepartment: '',
                    executorPhoneNum: '',
                    executorEmail: '',
                    executorQualification: '',
                    executorIdCard: '',
                    executorLevel: ''
                },
                // 专家详细信息
                expertmessage: {
                    expertId: '', // 表单id
                    expertName: '',
                    expertIdcard: '',
                    expertSex: '',
                    expertSeniority: '',
                    unitAddress: '',
                    workTime: '',
                    expertLevl: ''
                },
                companyInformation: [],
                currentRow: null,
                tableData: [],
                expertData: [],
                lawPersonData: [],
                showOnSubmit: true,
                
                showExpertExtract: true, // 抽取专家
                showLawPersonExtract: true, // 抽取执法人员
                
                dialogExpertForm: false,
                dialogLawPersonForm: false,
                expertInfoDialogForm: false, // 专家详情dialog
                lawPersonInfoDialogForm: false, // 执法人员详情dialog


                
                formDisabled: false,
                expertFormDisabled: false,
                lawFormDisabled: false
            }
        },
        mounted() {
            this.getData();
        },
        methods: {
            getData() {
                var pagesize = this.pagesize;
                var pageno = this.currentPage;
                axios({
                    method: 'get',
                    url: '/dzjap/expertRegulat/queryAll',
                    params: {
                        pageSize: pagesize,
                        pageNo: pageno
                    }
                })
                .then(response => {
                    let data = response.data;
                    if (data.code == 200) {
                        let dataInformation = data.data.results;
                        this.tableTotal = data.data.total;// 数据长度

                        this.tableData = dataInformation;

                    } else {
                        this.$message.error(data.msg);
                    }
                })
                .catch(function (error) {
                    console.log(error);
                });
            },
            // 添加审查专家监管任务
            apply(){
                this.clearExpertExtract();
                this.dialogExpertForm = true;
                this.showOnSubmit = true;
                this.formDisabled = false;
                this.expertFormDisabled = false;
            },
            // 搜索
            searchForm(selectForm) {
                var pagesize = this.pagesize;
                var pageno = this.currentPage;
                axios({
                    method: 'get',
                    url: '/dzjap/expertRegulat/queryAll',
                    params: {
                        pageSize: pagesize,
                        pageNo: pageno,
                        title: this.selectForm.title,
                    }
                })
                .then(response => {
                    let data = response.data;
                    if (data.code == 200) {
                        let dataInformation = data.data.results;
                        this.tableTotal = data.data.total;// 数据长度

                        this.tableData = dataInformation;
                    } else {
                        this.$message.error(data.msg);
                    }
                })
                .catch(function (error) {
                    console.log(error);
                });
            },

            // 清空专家信息抽取条件
            clearExpertExtract(){
                /*this.$nextTick(() => {
                    this.$refs['expertextract'].resetField();
                })*/
                this.showExpertExtract = true;
                this.expertextract.id = '';
                this.expertextract.title = '';
                this.expertextract.countryRatio = '';
                this.expertextract.provinceRatio = '';
                this.expertextract.cityRatio = '';
                this.expertextract.regulatoryNum = '';
                this.expertData = [];
            },
            // 清空执法人员信息抽取条件
            clearLawPersonForm(){
                this.lawpersonextract.taskId = '';
                this.lawpersonextract.linkId = '';
                this.lawpersonextract.id = '';
                this.lawpersonextract.countryRatio = '';
                this.lawpersonextract.provinceRatio = '';
                this.lawpersonextract.cityRatio = '';
                this.lawpersonextract.extractNum = '';
                this.showLawPersonExtract = true;
                this.lawPersonData = [];

            },
            /* 列表页重置 */
            resetForm(formName) {
                this.selectForm.title = '';
                this.getData();
            },
            //每页下拉显示数据
            handleSizeChange(size) {
                this.pagesize = size;
                this.getData();
            },
            //点击第几页
            handleCurrentChange(currentPage) {
                this.currentPage = currentPage;
                this.getData();
            },

            // 专家抽取
            expertExtract() {
                axios({
                    method: 'post',
                    url: '/dzjap/expertRegulat/extract',
                    data: this.expertextract
                })
                .then((response) => {
                    let data = response.data;
                    if (data.code == 200) {
                        this.$message({
                            type: 'success',
                            message: '专家抽取成功!'
                        });

                        this.expertExtractList(data.regulatId);
                    } else {
                        this.$message.error(data.msg);
                    }
                });
            },
            // 专家抽取结果展示
            expertExtractList(id){

                axios({
                    method: 'post',
                    url: '/dzjap/connectExpert/queryByRegulateId',
                    params: {
                        pageSize: this.expertPagesize,
                        pageNo: this.expertCurrentPage,
                        regulatId: id
                    }
                })
                .then((response) => {
                    debugger;
                    let data = response.data;
                    if (data.code == 200) {

                        let dataInformation = data.data.results;
                        this.expertTableTotal = data.data.total;// 数据长度
                        this.showExpertExtract = false;

                        this.expertData = dataInformation;
                        this.expertextract = data.expertExtract;
                    } else {
                        this.$message.error(data.msg);
                    }
                });
            },
            // 查看专家列表
            expertList(index, row) {
                this.dialogExpertForm = true;
                this.expertFormDisabled = true;
                this.expertExtractList(row.id);
            },

            // 查看专家详情
            expertView(index, row) {
                debugger;
                this.expertInfoDialogForm = true;
                axios({
                    method: 'post',
                    url: '/dzjap/info/findbyid/' + row.expertId
                })
                    .then(response => {
                        let data = response.data;
                        if (data.code == 200) {
                            let rowdata = response.data.apExpertEntity;
                            this.expertmessage = rowdata;
                        } else {
                            this.$message.error(data.msg);
                        }
                    })
                    .catch(function (error) {
                        console.log(error);
                    });
            },

            // 执法人员抽取页面
            expertLawPerson(index,row){
                this.clearLawPersonForm();
                this.lawpersonextract.taskId = row.taskId;
                this.lawpersonextract.linkId = row.expertId;
            	this.dialogLawPersonForm = true;
                this.lawFormDisabled = false;
            },
            // 执法人员抽取
            lawPersonExpert() {
                axios({
                    method: 'post',
                    url: '/dzjap/apExpertExtractLawer/extractLawer',
                    data: this.lawpersonextract
                })
                .then((response) => {
                    let data = response.data;
                    if (data.code == 200) {
                        this.$message({
                            type: 'success',
                            message: '执法人员抽取成功!'
                        });

                        this.lawPersonExpertList();
                    } else {
                        this.$message.error(data.msg);
                    }
                });
            },
            // 执法人员抽取结果展示
            lawPersonExpertList(){
                var lawpersonPagesize = this.lawPersonPagesize;
                var lawpersonCurrentPage = this.lawPersonCurrentPage;

                axios({
                    method: 'get',
                    url: '/dzjap/apExpertExtractLawer/queryLawerByTaskIdAndExpertId',
                    params: {
                        pageSize: this.lawpersonPagesize,
                        pageNo: this.lawpersonCurrentPage,
                        expertId: this.lawpersonextract.linkId,
                        taskId: this.lawpersonextract.taskId
                    }
                })
                .then((response) => {
                    debugger;
                    let data = response.data;
                    if (data.code == 200) {
                        let dataInformation = data.data.results;
                        this.lawPersonTableTotal = data.data.total;// 数据长度
                        this.showLawPersonExtract = false;

                        this.lawPersonData = dataInformation;
                        this.lawpersonextract = data.extractLawer;

                        this.expertExtractList(data.extractLawer.taskId);
                    } else {
                        this.$message.error(data.msg);
                    }
                });
            },
            // 查看执法人员列表
            lawPersonList(index,row) {
                this.dialogLawPersonForm = true;
                this.lawFormDisabled = true;
                this.lawpersonextract.taskId = row.taskId;
                this.lawpersonextract.linkId = row.expertId;
                this.lawPersonExpertList();

            },
            // 执法人员-查看详细
            lawPersonView(index, row){
                this.lawPersonInfoDialogForm = true;
                axios({
                    method: 'get',
                    url: '/dzjap/executorInfo/getexecutorinfo',
                    params: {
                        executorid: row.id
                    }
                })
                    .then(response => {
                        let data = response.data;
                        if (data.code == 200) {
                            let rowdata = response.data.data;
                            this.lawperson = rowdata;
                        } else {
                            this.$message.error(data.msg);
                        }
                    })
                    .catch(function (error) {
                        console.log(error);
                    });
            }


        }
    })

</script>
</html>